﻿using System;
using System.Collections.Generic;
using System.Text;
using SimpleFS.Core;

namespace SimpleFS.Services.Transactions.Implementations.Directories
{
    public class Create : TransactableOperationTemplate
    {
        internal IDirectory target = null;

        public Create(IDirectory target, IResourceManager resourceManager)
        {
            this.target = target;
            base.resourceManager = resourceManager;
        }

        protected override void Operate()
        {
            this.target.Create();
        }

        public override void Commit()
        {
            
        }

        public override void Rollback()
        {
            this.target.Delete();
        }
    }
}
